package com.service.setting.impl;

import com.comm.R;
import com.comm.vo.DispositionVo;
import com.mapper.setting.SystemDispositionMapper;
import com.service.setting.SystemDispositionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SystemDispositionServiceImpl implements SystemDispositionService {


    @Autowired
    private SystemDispositionMapper mapper;
    @Override
    public R addDisposition(DispositionVo vo) {
        R r = new R();
        try {
            int i = mapper.addDisposition(vo);
            r.setCode(200);
            r.setMsg("编辑成功");
            return r;

        }catch (Exception e){
            e.printStackTrace();
            r.setCode(500);
            r.setMsg("发生了个出乎意料的错误");
            return r;
        }
    }
}
